/**
 * @Description TODO
 * @Classname single
 * @Date 2024/5/7
 * @Author sh
 **/
public class SingleInstance {

    private static volatile SingleInstance singleInstance;

    public static SingleInstance getInstance() {
        if (singleInstance == null) {
            synchronized (SingleInstance.class) {
                if (singleInstance == null) {
                    singleInstance = new SingleInstance();
                }
            }
        }

        return singleInstance;
    }

}
